Declare @StartDate datetime
Declare @EndDate datetime

SET @StartDate = '01-Jun-2014'
SET @EndDate = '30-Jun-2014'

select count(*) from tblCaseProfileIndex CPI
INNER JOIN tblUser U ON U.UserID = CPI.ClosedBy
INNER JOIN tblTeam T ON T.TeamID = U.TeamID
Where Convert(varchar(8), CPI.ClosedOn, 112) Between Convert(varchar(8), @StartDate, 112) And Convert(varchar(8), @EndDate, 112)
And CPI.CaseSourceID = 1 And CPI.IsReplyCase = 0 And CPI.CaseStatus = 100
And T.TeamTypeID = 1

select count(*) from tblCaseProfileIndex CPI
INNER JOIN tblUser U ON U.UserID = CPI.ClosedBy
INNER JOIN tblTeam T ON T.TeamID = U.TeamID
Where Convert(varchar(8), CPI.ClosedOn, 112) Between Convert(varchar(8), @StartDate, 112) And Convert(varchar(8), @EndDate, 112)
And CPI.CaseSourceID = 1 And CPI.NoOfWorkingDays <= 3 And CPI.IsReplyCase = 0 And CPI.CaseStatus = 100
And T.TeamTypeID = 1

select count(*) from tblCaseProfileIndex CPI
INNER JOIN tblUser U ON U.UserID = CPI.ClosedBy
INNER JOIN tblTeam T ON T.TeamID = U.TeamID
Where Convert(varchar(8), CPI.ClosedOn, 112) Between Convert(varchar(8), @StartDate, 112) And Convert(varchar(8), @EndDate, 112)
And CPI.CaseSourceID = 2 And CPI.IsReplyCase = 0 And CPI.CaseStatus = 100
And T.TeamTypeID = 1

select count(*) from tblCaseProfileIndex CPI
INNER JOIN tblUser U ON U.UserID = CPI.ClosedBy
INNER JOIN tblTeam T ON T.TeamID = U.TeamID
Where Convert(varchar(8), CPI.ClosedOn, 112) Between Convert(varchar(8), @StartDate, 112) And Convert(varchar(8), @EndDate, 112)
And CPI.CaseSourceID = 2 And CPI.NoOfWorkingDays <= 3 And CPI.IsReplyCase = 0 And CPI.CaseStatus = 100
And T.TeamTypeID = 1

